package com.atguigu.yygh.client;

import com.atguigu.yygh.common.result.ResultCode;
import com.atguigu.yygh.model.cmn.Dict;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient("service-cmn")
public interface CmnFeignClient {
    @GetMapping("/admin/cmn/dict/getName/{value}/{dictCode}")
    String getNameByValueAndDictCode(@PathVariable String value, @PathVariable String dictCode);

    @GetMapping("/admin/cmn/dict/getName/{value}")
    String getNameByValue(@PathVariable String value);
    @GetMapping("/admin/cmn/dict/getDict/{province}")
    List<Dict> getDictByDictCode(@PathVariable String province);
    @GetMapping("/admin/cmn/dict/getDict/{province}")
    List<Dict> findByParentId(String provinceCode);

    @GetMapping("/admin/cmn/dict/getChildDataById/{id}")
    List<Dict> getChildDataById(@PathVariable String id);

}
